<?php

use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $time = time();
        // $this->call(UsersTableSeeder::class);
        App\Models\Department::firstOrCreate(
            ['name' => '根目录', 'created_at' => $time, 'updated_at' => $time]);
        $check_step = App\Models\Step::where(['flow_id' => 0])->first();
        if (empty($check_step)) {
            App\Models\Step::insert([
                ['name' => '初审', 'created_at' => $time, 'updated_at' => $time],
                ['name' => '发放offer', 'created_at' => $time, 'updated_at' => $time],
                ['name' => '入职', 'created_at' => $time, 'updated_at' => $time],
            ]
            );
        }
    }
}
